package com.grouppurchase.service;

import com.grouppurchase.entity.TraditionalGroup;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

public interface GroupService extends IService<TraditionalGroup> {
    
    List<TraditionalGroup> getActiveGroupsByProduct(Long productId);
    
    TraditionalGroup createGroup(Long productId, Integer targetSize);
    
    boolean joinGroup(Long groupId, Long userId);
    
    TraditionalGroup getGroupByNo(String groupNo);
    
    boolean checkGroupExpired(TraditionalGroup group);
    
    void handleExpiredGroups();
}
